/**
 * WebModuleServiceImpl.java
 * @author
 * 作者 屈甲康 
 */
package org.jackysoft.service.impl;

import java.util.Collection;

import javax.annotation.Resource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jackysoft.data.AbstractDataProvider;
import org.jackysoft.entity.WebModule;
import org.jackysoft.mapper.WebModuleMapper;
import org.jackysoft.service.WebModuleService;
import org.jackysoft.util.WebModuleState;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;

@Service
public class WebModuleServiceImpl extends
		AbstractDataProvider<WebModule> implements
		WebModuleService {
	final static Log logger = LogFactory.getLog(WebModuleServiceImpl.class);

	@Resource 
	WebModuleMapper mapper;
	public WebModuleServiceImpl() {
		super();
	}

	@Override
	public Collection<WebModule> getModules(WebModuleState state)
			throws DataAccessException {
		Collection<WebModule> alist = mapper.findByState(state.ordinal());
		return alist;
	}
}